﻿<UserControl x:Class="DoctorsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
             DataContext="{Binding RelativeSource={RelativeSource Self}}"
             xmlns:lib="clr-namespace:HMSLibrary;assembly=HMSLibrary" 
             xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit">
    <Grid Width="400">
        <Grid Name="MainGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="300"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="28"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Text="First Name:" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="First Name" Name="FirstNameTextBox" Margin="2"/>
            <TextBlock Text="Last Name:" Grid.Row="1" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Last Name" Grid.Row="1" Name="LastNameTextBox" Margin="2"/>
            <TextBlock Text="Sur Name:" Grid.Row="2" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Sur Name" Grid.Row="2" Name="SurNameTextBox" Margin="2"/>
            <TextBlock Text="Address:" Grid.Row="3" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Address" Grid.Row="3" Name="AddressTextBox" Margin="2"/>
            <TextBlock Text="Tel. No.:" Grid.Row="4" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Telephone no" Grid.Row="4" Name="TelNoTextBox" Margin="2"/>
            <TextBlock Text="Mobile No.:" Grid.Row="5" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Mobile no."  Grid.Row="5" Name="MobileNoTextBox" Margin="2"/>
            <TextBlock Text="Gender:" Grid.Row="6" Style="{StaticResource TextBlockStyle}"/>
            <StackPanel Grid.Column="1" Grid.Row="6" Margin="4" Orientation="Horizontal">
                <RadioButton Content="Male" Name="MaleRadioButton" Margin="5,2" GroupName="g" IsChecked="True"/>
                <RadioButton Content="Female" GroupName="g" Margin="5,2"/>
            </StackPanel>
            <TextBlock Text="Age:" Grid.Row="7" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Grid.Column="1" Watermark="Age" Grid.Row="7" Name="AgeTextBox" Margin="2"/>
            <TextBlock Text="Registration No:" Grid.Row="8" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Watermark="Registration No" Grid.Column="1"  Grid.Row="8" Name="LicenseNoTextBox" Margin="2"/>
            <TextBlock Text="Consultation Charge:" Grid.Row="9" Style="{StaticResource TextBlockStyle}"/>
            <extToolkit:WatermarkTextBox Watermark="Consultation Charge" Grid.Column="1"  Grid.Row="9" Name="ConsultationChargeTextBox" Margin="2"/>
            <TextBlock Text="Specialization :" Grid.Row="10" Style="{StaticResource TextBlockStyle}"/>
            <ComboBox Grid.Column="1" Grid.Row="10" Margin="2" Name="SpecializationComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
            <TextBlock Text="Dr. Type :" Grid.Row="11" Style="{StaticResource TextBlockStyle}"/>
            <ComboBox Grid.Column="1" Grid.Row="11" Margin="2" Name="DrTypeComboBox" DisplayMemberPath="Name" SelectedValuePath="ID"/>
        </Grid>
        <StackPanel Name="FindStackPanel" Visibility="Collapsed">
            <lib:SearchBox x:Name="Ctrl" HorizontalAlignment="Right" Margin="10,5"
					Width="249" Height="22" Mode="{Binding SelectedValue.Content, ElementName=SearchMode}"
					Prompt="Search text" ToolTip="Type to search the current view">
                <lib:SearchBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Option 1" IsCheckable="True"/>
                        <MenuItem Header="Option 2" IsCheckable="True"/>
                    </ContextMenu>
                </lib:SearchBox.ContextMenu>
                <lib:SearchBox.LayoutTransform>
                    <ScaleTransform ScaleX="{Binding Value, ElementName=Scaler}" 
																						ScaleY="{Binding Value, ElementName=Scaler}"/>
                </lib:SearchBox.LayoutTransform>
            </lib:SearchBox>
            <extToolkit:BusyIndicator Name="BusyIndicator1" Grid.ColumnSpan="3"/>
            <ScrollViewer Margin="5" MaxHeight="250">
                <my:DataGrid Grid.Row="2" Name="SearchDataGrid" Style="{StaticResource SerachDataGridStyle}">
                    <my:DataGrid.Columns>
                        <my:DataGridTemplateColumn Width="20">
                            <my:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Button Template="{StaticResource DeleteButtonTemp}" Name="DeleteButton" Click="DeleteButton_Click"/>
                                </DataTemplate>
                            </my:DataGridTemplateColumn.CellTemplate>
                        </my:DataGridTemplateColumn>
                        <my:DataGridTextColumn Header="First Name" Binding="{Binding FirstName}" />
                        <my:DataGridTextColumn Header="Last Name" Binding="{Binding LastName}" />
                        <my:DataGridTextColumn Header="Sur Name" Binding="{Binding SurName}" />
                        <my:DataGridTextColumn Header="Address" Binding="{Binding Address}" />
                        <my:DataGridTextColumn Header="Tel. No" Binding="{Binding TelephoneNo}" />
                        <my:DataGridTextColumn Header="Mobile No" Binding="{Binding MobileNo}" />
                        <my:DataGridTextColumn Header="Gender" Binding="{Binding Gender}" />
                        <my:DataGridTextColumn Header="Age" Binding="{Binding Age}" />
                        <my:DataGridTextColumn Header="Registration No" Binding="{Binding LicenseNo}" />
                        <my:DataGridTextColumn Header="Specialization" Binding="{Binding Specialization}" />
                        <my:DataGridTextColumn Header="Dr Type" Binding="{Binding DrType}" />
                        <my:DataGridTextColumn Header="Consultation Charge" Binding="{Binding ConsultationCharge}" />
                    </my:DataGrid.Columns>
                </my:DataGrid>
            </ScrollViewer>
        </StackPanel>
    </Grid>
</UserControl>
